package com.wenhao.newcode.pinduoduo.hard2021;

import java.util.*;

/**
 * @author Wenhao Tong
 * @create 2021-07-25 11:44
 */
public class Main2 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int N = scanner.nextInt();
        String X = scanner.next();
        String Y = scanner.next();
        char[] XChars = X.toCharArray();
        char[] YChars = Y.toCharArray();
        Arrays.sort(XChars);
        Arrays.sort(YChars);
        int res = 0;
        for (int i = 0;i < N;i++) {
            res += Math.abs(XChars[i] - YChars[i]);
        }
        System.out.println(res);
    }
}
